package di;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;

@Configuration
@ComponentScan("di")
public class SpringConfig {

//    @Bean
//    public ResourceBean resourceBean() {
//        ResourceBean bean = new ResourceBean();
//        bean.setResource(new FileSystemResource("a.txt"));
//        return bean;
//    }
    @Bean
    public Resource resource() {
        return new FileSystemResource("a.txt");
    }


}
